< previous page page_454 next page >

Page 454
LISTING 20.2.CONTINUED
9f8044bafea36a1f728739c0bb58ef4c.gif
 30: 'In a business rule collection object such as EveryCashDepositRecord
 31: Public Sub buildReport(argFileName As String, _
 32: Optional argRichTextBox As RichTextBox)
 33:     Dim objObject As Customer, sFileName As String
          objRichTextBox As RichTextBox
 34:     Dim sMsg As String, lRecCount As Long, sTempFile As String
 35:     Dim bCol(3) As Byte
 36:
 37:     Set objRichTextBox = argRichTextBox
 38:     sFileName = argFileName
 39:     theReportController.setTabs 5
 40:     'Assists this class in creating an object for each record
 41:     'in the file
 42:     sMsg = Building report information
 43:     theReportController.updateProgress 0, sMsg, Me.Count
 44:     theFileSubsystem.populatePCPhysicians sFileName, Me
 45:
 46:     sMsg = Records processed
 47:     theReportController.updateProgress 0, sMsg, Me.Count
 48:
 49:     bCol(0) = 12
 50:     bCol(1) = 20
 51:     bCol(2) = 5
 52:     bCol(3) = 20
 53:
 54:     objRichTextBox.SelTabs(0) = bCol(0)
 55:     objRichTextBox.SelTabs(1) = bCol(1)
 56:     objRichTextBox.SelTabs(2) = bCol(2)
 57:     objRichTextBox.SelTabs(3) = bCol(3)
 58:
 59:     'Set temporary report file
 60:     sTempFile = App.Path & \report.tmp
 61:     Open sTempFile For Append As #1
 62:     Width #1, 80
 63:     For Each objObject In Me
 64:         lRecCount = lRecCount + 1
 65:         objRichTextBox.TabStop = True
 66:         With objRichTextBox
 67:             If objObject.CustomerID =  Then
 68:                 objObject.CustomerID = String(7, ?)
 69:             End If
 70:             If objObject.FirstName =  Then
 71:                 objObject.FirstName = String$(12, ?) '--
 72:             End If
 73:             If objObject.MiddleInitial =  Then
 74:                 objObject.MiddleInitial = ----
 75:             End If
continues

 
< previous page page_454 next page >

If you like this book, buy it!